package com.chixing.day01_syntax;

public class word {
    public static void main(String[] agrs){
        for(int i=2;i<100;i++) {
            int z = 0;
            for (int j = 2; j <= i; j++) {
                if (i % j == 0) {
                    z++;
                }
            }
            if (z == 1) {
                System.out.println(i);
            }
        }


        int[] arr = {10,43,28,3,84,10,74,89,33,43,10};
        int sum = 0;
        for (int i=0;i<arr.length;i++){
            for (int j=i+1;j<arr.length;j++) {
                if (arr[i] == arr[j]) {
                    sum++;
                }
            }
            if (sum==1) {
                System.out.println(arr[i]);
            }
            sum = 0;
        }

        int n = 5;
        for (int i=0;i<n;i++){
            for (int j=0;j<i;j++){
                System.out.print(" ");
            }
            for (int k=0;k<2*(n-i)-1;k++){
                System.out.print("*");
            }
            System.out.print("\n");
        }
    }
}
